<?php
/**
 * Copyright (c) 2016.  hangzhou BOYE .Co.Ltd. All rights reserved
 */

/**
 * Created by PhpStorm.
 * User: 1
 * Date: 2016-12-17
 * Time: 15:05
 */

namespace app\src\scoreEditApply\logic;


use app\src\base\logic\BaseLogic;
use app\src\scoreEditApply\model\scoreEditApply;

class ScoreEditApplyLogic extends BaseLogic
{
    public function _init()
    {
        $this->setModel(new scoreEditApply());
    }

    /**
     * 申请列表
     * @param array $page
     * @param int $apply_status
     * @return array
     */
    public function applyList($page = ['curpage'=>1,'size'=>10], $apply_status = 0)
    {
        $map = [
            'apply_status' => $apply_status,
            'status' => 0
        ];

        $order = ['create_time' => 'desc'];
        $result = $this->queryWithCount($map, $page, $order);

        return $result;
    }
}